package com.hist.medical_treatment.service.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hist.medical_treatment.dao.UserDao;
import com.hist.medical_treatment.entity.User;
import com.hist.medical_treatment.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	@Autowired
	UserDao dao;
	
	@Override
	public List<User> getUser() {
		// TODO Auto-generated method st
		return dao.getUser();
	}

	@Override
	public void deleteUserByID(Integer id) {
		// TODO Auto-generated method stub
		dao.deleteUserByID(id);
	}

	@Override
	public void updateUserByID(Integer id, String userName, String realName, Integer useType, Integer docTitleId,
			String isScheduling, Integer deptId, Integer registLeId) {
		// TODO Auto-generated method stub
		dao.updateUserByID(id, userName, realName, useType, docTitleId, isScheduling, deptId, registLeId);
	}

	@Override
	public Integer getIDByConstantName(String constantName) {
		// TODO Auto-generated method stub
		return dao.getIDByConstantName(constantName);
	}

	@Override
	public Integer getIDByDeptName(String deptName) {
		// TODO Auto-generated method stub
		return dao.getIDByDeptName(deptName);
	}

	@Override
	public Integer getIDByRegistName(String registName) {
		// TODO Auto-generated method stub
		return dao.getIDByRegistName(registName);
	}

	@Override
	public void insertUser(String userName,String password, String realName, Integer useType, Integer docTitleId, String isScheduling,
			Integer deptId, Integer registLeId) {
		// TODO Auto-generated method stub
		dao.insertUser(userName, password,realName, useType, docTitleId, isScheduling, deptId, registLeId);
	}

	@Override
	public String getPassword(Integer id) {
		// TODO Auto-generated method stub
		return dao.getPassword(id);
	}

	@Override
	public void updatePassword(Integer id,String password) {
		// TODO Auto-generated method stub
		dao.updatePassword(id,password);
	}

	

}
